// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "MyPlayerController.generated.h"

class AMyPawn;
/**
 * 
 */
UCLASS()
class  AMyPlayerController : public APlayerController
{
	GENERATED_BODY()
	AMyPlayerController();
	virtual void BeginPlay() override;
	virtual void SetupInputComponent() override;

	//左键按下
	void OnLeftMouseButtonDown();
	//左键抬起
	void OnLeftMouseButtonUp();
	void MoveForward(float AxisValue);
	void MoveRight(float AxisValue);
	void MoveUp(float AxisValue);
	void LookUpRate(float AxisValue);
	void TurnRate(float AxisValue);
	void MouseWheel(float AxisValue);
	void OnPressedRightMouseButton();
	void OnRealeasedRightMouseButton();
	void CameraZoom(float AxisValue,float Diatance,float Clamp,FVector Location);
	//鼠标移动
	void MouseMove();
	//获取鼠标在屏幕上集中的位置
	FVector GetMouseAndHorizontalPlaneHitLocation(FVector MouseLocation,FVector MouseDirection,FVector PointOnThePlane);
	//当点击到背景时所返回的坐标
	FVector PointSpaceLocation();
public:
	AMyPawn *MyPawn;
	FVector ClickLocation;
};
